{% extends 'base.html' %}
{% load news_extras %}
{% block title %}{{ channel.name }} - 畜牧大集网{% endblock %}
{% block meta %}
<link href="{{ STATIC_URL }}css/list.css" rel="stylesheet" type="text/css" />
{% endblock %}


<ul>
{% for item in articles %}
<li><a href="">{{ item.title }}</a></li>
{% endfor %}
</ul>

{% block content %}
	<div class="content c-2">
        <div class="c-l">
        	<ul class="txt-title">
            	<li class="now now-min"><span class="now-c">{{ channel.name }}</span></li>
            	<li class="more">
                {% for aditem in ads.title_ad %}
                <a href="{{ aditem.ad_link }}" target="_blank"><img width="80" height="28" src="{{ aditem.ad_file.url }}" alt="{{ aditem.ad_text }}" /></a></li>
                {% endfor %}
            </ul>
            <div class="txt-box">
            {% for item in headlines %}
                <div class="list-top {% if not forloop.last %}list-line{% endif %}">
                    <div class="flot-l"><a href="/news/view/{{ item.id }}.html" target="_blank"><img width="147" height="107" src="{{ item.headline_image.url }}" alt="" /></a></div>
                    <div class="flot-r">
                        <h4><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.title }}</a></h4>
                        <p>{{ item.summary|truncatehanzi:"115" }}</p>
                        <div class="more-box"><a href="/news/view/{{ item.id }}.html" class="more" target="_blank">详细</a></div>
                    </div>
                </div>
            {% endfor %}
                <div class="link-pic"></div>
                <div class="list-content">
                	<div class="list-pic">
                        <!--JQ slideable_begin-->
                        <div class="trigger-bar"><a href="javascript:void(0);" title="Previous" class="prev" target="_self"></a></div> 
                        <div class="slide-box">       
                            <div class="scrollable-panel">
                                <ul>
                                {% for aditem in ads.left_ad %}
                                    <li><a href="{{ aditem.ad_link }}" title="" target="_blank"><img width="145" height="106" src="{{ aditem.ad_file.url }}" alt="{{ aditem.ad_text }}" /></a></li>
<!--
                                    <li><a href="###" title=""><img src="{{ STATIC_URL }}images/index_121.gif" alt="" /></a></li>
                                    <li><a href="###" title=""><img src="{{ STATIC_URL }}images/index_123.gif" alt="" /></a></li>
                                    <li><a href="###" title=""><img src="{{ STATIC_URL }}images/index_125.gif" alt="" /></a></li>
                                    <li><a href="###" title=""><img src="{{ STATIC_URL }}images/index_127.gif" alt="" /></a></li>
                                    <li><a href="###" title=""><img src="{{ STATIC_URL }}images/index_129.gif" alt="" /></a></li>
                                    <li><a href="###" title=""><img src="{{ STATIC_URL }}images/index_131.gif" alt="" /></a></li>
                                    <li><a href="###" title=""><img src="{{ STATIC_URL }}images/index_121.gif" alt="" /></a></li>
-->
                                {% endfor %}
                                </ul>
                            </div>
                        </div>
                        <div class="trigger-bar"><a href="javascript:void(0);" title="next" class="next" target="_self"></a></div>
                    </div>
                    <div class="list">
                        <ul>
                        {% for article in articles %}
                            <li><b><a href="/news/view/{{ article.id }}.html" target="_blank">{{ article.title }}</a></b><span>{{ article.updated|date:"SHORT_DATE_FORMAT" }}</span></li>
                        {% endfor %}
                        </ul>
                    </div>
                </div>
        	</div>
            <div class="box-b"><span></span></div>
            <div class="page-list">
{% if page_range %}
                <ul>
                    {% if cur_page.has_previous %}<li class="prev"><a href="?p={{ cur_page.previous_page_number }}">上一页</a></li>{% endif %}
{% for p in page_range %}
    {% if p == page_num %}
                    <li class="current">{{ p }}</li>
    {% else %}
                    <li><a href="?p={{ p }}">{{ p }}</a></li>
    {% endif %}
{% endfor %}
                    {% if cur_page.has_next %}<li class="next"><a href="?p={{ cur_page.next_page_number }}">下一页</a></li>{% endif %}
                </ul>
{% endif %}
            </div>
        </div>
        <div class="c-r txt-list">
            {% include 'news/search-box.html' %}
            {% include 'news/trends.html' %}
            <div class="ad-min">
            {% for aditem in ads.sidebar_ad %}
            <a href="{{ aditem.ad_link }}" target="_blank"><img src="{{ aditem.ad_file.url }}" width="240" height="240" alt="{{ aditem.ad_text }}" /></a>
            {% endfor %}
            </div>
            {% include 'news/observation.html' %}
        </div>
    </div>
<!--list page-->
{% endblock %}
{% block load_script %}
<script>
$(function() {
    $(".scrollable-panel").jCarouselLite({
        speed:2000,
        auto: null,
        mouseOver: true,
        btnNext: ".next",
        btnPrev: ".prev",
        vertical: true
    });
});
</script>
<!--JQ slideable_end-->
{% endblock %}
